package tresp.coordinator;

import tresp.utils.BThreadVote;
import tresp.utils.ITankInfo;


/**
 * 
 * <b>ICoordinator</b>
 * 
 * <p>
 * 	This interface represents the Coordinator contract. 
 * </p>
 * 
 * 
 * @author <font color="blue">Maxim Kirilov</font>
 *
 */
public interface ICoordinator<E> extends Runnable{

    /**
     * 
     * @return the next vote to promote.
     */
    E getNextVote();
    
    
    /**
     * Vote for the selected action.
     * 
     * @param vote
     */
    void vote(BThreadVote vote);
    
    
    /**
     * Vote for the selected action with vote type
     * 
     * @param vote
     */
    void vote(BThreadVote vote, BThreadVoteType voteType);
    
    /**
     * This method will stop the coordinator.
     */
    void stop();
    
    /**
     * 
     * @return the coordinator's level.
     */
    int getLevel();
    
    /**
     * 
     * @return tank information.
     */
    ITankInfo getTankInfo();
}
